Skip to content

Conversation

maksimsab
Copy link
Contributor

This patch resolves a warning about expensive copy in function invocation which accepts ModuleDesc by value, thus taking ownership of ModuleDesc. Now ownership is transferred into functions by using unuqie_ptr. Also, the patch removes many usages of r-value references in function's arguments because r-value reference supposes a ownership transfer but does not oblige that.

This patch resolves a warning about expensive copy in function
invocation which accept ModuleDesc by value, thus taking ownership of
ModuleDesc. Now ownership is transfered into functions by using
unuqie_ptr. Also, the patch removes many usages of r-value references in
function's arguments because r-value reference supposes a ownership
transfer but does not oblige that.
Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SYCL RTC LGTM.

expensive copy in function invocation

I think that's relative, are you saving enough on copies to justify extra heap allocation?

@maksimsab
Copy link
Contributor Author

I think that's relative, are you saving enough on copies to justify extra heap allocation?

Tradeoffs in both cases are negligible. The goal of the PR is just to resolve the warning.

@intel/llvm-gatekeepers Can we merge that?
CI failures look like what this issue is about: #20361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants